#include<queue>
#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;
const ll inf=2100000000;
queue<ll>q1;
queue<ll>q2;
queue<ll>q3;
bool cmp(const int &a,const int &b){
    return a>b;
}
int findmax(){
    int x,x1,x2,x3;
    if(!q1.empty())x1=q1.front();
    else x1=-inf;
      if(!q2.empty())x2=q2.front();
    else x2=-inf;
      if(!q3.empty())x3=q3.front();
    else x3=-inf;
    if(x1>x2&&x1>x3){
        x=x1;
        q1.pop();
    }
    else if(x2>x3){
        x=x2;
        q2.pop();
    }
    else{
        x=x3;
        q3.pop();
    }
    return x;

}
ll qy[200000];
int main(){
    ll n,m,q,u,v,t;
    cin>>n>>m>>q>>u>>v>>t;
    for(int i=1;i<=n;i++){
        
        cin>>qy[i];
    }
    sort(qy+1,qy+1+n,cmp);
     for(int i=1;i<=n;i++){
      
        q1.push(qy[i]);
    }
    for(int i=1;i<=m;i++){
       int now=findmax();
       now+=(i-1)*q;
       if(i%t==0)printf("%d ",now);
       int d1=now*u/v;
       int d2=now-d1;
       d1-=i*q;
       d2-=i*q;
       q2.push(d1);
       q3.push(d2);
    }
    cout<<endl;
    for(int i=1;i<=n+m;i++){
        int now=findmax();
        now+=m*q;
        if(i%t==0)printf("%d ",now);
    }
    return 0;
}